{%extends "frontend/base.html"%}
{% load static %}


{%block ngapp%}ng-app="myApp"{%endblock%}
{%block js%}
  <link rel="stylesheet" href="{% static "bower_components/bootstrap/dist/css/bootstrap.min.css" %}" type="text/css" />
    <script src="{% static "bower_components/jquery/dist/jquery.js" %}"></script>
<script src="{% static "bower_components/angular/angular.min.js" %}"></script>
    <script src="{% static "bower_components/angular-ui-router/release/angular-ui-router.min.js" %}"></script>
<script src="{% static "bower_components/angular-animate/angular-animate.min.js" %}"></script>
<script src="{% static "bower_components/angular-touch/angular-touch.min.js" %}"></script>
    <!-- bootstrap -->
<script src="{% static "bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js" %}"></script>
{%endblock%}
{%block content%}
{%verbatim%}
<div ng-controller="SearchCtrl">
<div class="panel panel-default">
  <div class="panel-body">
      <div  class="search-item"><span>标题：<input name="title" type="text" value=""  ng-model="params.title"/></span> <span style="float: left;">作者：<input name="author" value="" type="text"  ng-model="params.author" /> </span></div>
    <div class="search-item"><span style="float: left;">行业：</span><ul>
      <li><a ng-click="select_trade('');"  ng-class="{' active' : params.trade=='' }">全部</a></li>
      <li ng-repeat="trade in metadata.trades"><a ng-click="select_trade(trade.code);"  ng-class="{' active' : trade.code==params.trade}">{{trade.name}}</a></li>
      </ul></div>
      <div class="search-item"><span style="float: left;">频率：</span><ul>
        <li><a ng-click="select_frequency('');"  ng-class="{' active' : params.frequency=='' }">全部</a></li>
      <li ng-repeat="frequency in metadata.frequencys"><a ng-click="select_frequency(frequency.code);" ng-class="{' active' : frequency.code==params.frequency}">{{frequency.name}}</a></li>
      </ul></div>
      <div class="search-item"><span style="float: left;">机构：</span><ul><li><a ng-click="select_institution('');"  ng-class="{' active' : params.institution=='' }">全部</a></li><li ng-repeat="institution in metadata.institutions"><a ng-click="select_institution(institution.code);"  ng-class="{' active' : institution.code==params.institution}">{{institution.name}}</a></li></ul></div>


  </div>
</div>
<div class="list">
<table class="table">


      <tr ng-repeat="item in data.items">
        <td><a href="#" ng-click="toReportDetail(item.id);">{{item.name}}</a></td>
           <td>{{item.products.name}}</td>
          <td>{{item.institution.name}}</td>
        <td><span ng-repeat="author in item.authors">{{author.name}}</span></td>
        <td>{{item.price }}</td>

        <td></td>

    </tr>
{%endverbatim%}
</table>

    <nav>
  <ul class="pagination">

    <li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>

  </ul>
</nav>

</div>
    </div>
</div>
{%endblock%}
{%block bottomjs%}
<script src="{% static "javascript/controllers/search.js" %}"></script>
{% endblock %}



